import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadDemo22 {

    public static void main(String[] args) {
        //标准库里提供的现成的线程池
        //构建一个固定10线程的线程池
        ExecutorService poll= Executors.newFixedThreadPool(10);
        //这个不是固定的，是按需要创建的
        //Executors.newCachedThreadPool();
        poll.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("hello");
            }
        });
    }
}
